/**
 * Tool模块主入口文件
 * 用于组织和管理编辑器的各种功能按钮初始化逻辑
 */

// 导出各功能模块
import initUndoRedo from './features/undoRedo'
import initTextFormat from './features/textFormat'
import initParagraphFormat from './features/paragraphFormat'
import initInsertElements from './features/insertElements'
import initControls from './features/controls'
import initTitle from './features/title'
import initSearchAndPrint from './features/searchAndPrint'
import initPageSettings from './features/pageSettings'
import initContentBlock from './features/contentBlock'
import initEditorMode from './features/editorMode'
import initComment from './features/comment'
import initContextMenu from './features/contextMenu'
import initShortcuts from './features/shortcuts'
import initEventListeners from './features/eventListeners'

/**
 * 初始化所有工具模块
 * @param editor 编辑器实例
 * @param isApple 是否为苹果设备
 */
export function initTools(editor: any, isApple: boolean, commentList: any[]): void {
  // 初始化各功能模块
  initUndoRedo(editor, isApple)
  initTextFormat(editor, isApple)
  initParagraphFormat(editor, isApple)
  initInsertElements(editor)
  initControls(editor)
  initTitle(editor, isApple)
  initSearchAndPrint(editor, isApple)
  initPageSettings(editor)
  initContentBlock(editor)
  initEditorMode(editor)
  initComment(editor)
  initShortcuts(editor, isApple)
  initEventListeners(editor)
  initContextMenu(editor, commentList)
}
